// 签名
import _bale from '../utils/package.js'
// 获取不同的接口地址
import { COMMON_API, SHARE_API, ACTIVITY_API, INDEXS_API, SEARCH_API } from '../config/index.js'
import { Service } from '../utils/server.js'
class HomeModel extends Service {
  getActivity(params) {
    return this.postRequest(SHARE_API + '/applietLazy/selectLazyActivity_3', {
      data: _bale('selectLazyActivity_3', params)
    })
  }

  //获取轮播列表
  getBannerList(params) {
    return this.postRequest(ACTIVITY_API + '/banner/queryBanner', {
      data: _bale('queryBanner', params)
    })
  }

  //获取发现列表
  getDiscoverList(params) {
    return this.postRequest(COMMON_API + '/evaluate/queryEvaluate', {
      data: _bale('queryEvaluate', params)
    })
  }
  //小程序 专场图标列表
  getSpecialLogo(params) {
    return this.postRequest(SHARE_API + '/applietLazy/selectSpecialLogo', {
      data: _bale('selectSpecialLogo', params)
    })
  }
  //查询最后疯抢
  queryCrazy() {
    return this.postRequest(INDEXS_API + '/banner/queryCrazy', {
      data: _bale('queryCrazy')
    })
  }
  searchBrands(params) {
    return this.postRequest(SEARCH_API + '/pro/queryListBuyer', {
      data: _bale('/queryListBuyer', params)
    })
  }
  //  导航栏
  getNaviList(params) {
    return this.postRequest(SHARE_API + '/applietLazy/selectNaviList', {
      data: _bale('selectNaviList', params)
    })
  }
  //根据国际编码查询商品信息
  queryByGbCode(params) {
    return this.postRequest(INDEXS_API + '/goods/queryByGbCode', {
      data: _bale('queryByGbCode', params)
    })
  }
}
export { HomeModel }
